window.onload = function(){
    var E = window.wangEditor
    editor = new E('#editor')
    // 或者 var editor = new E( document.getElementById('editor') )
    // 配置弹幕的类型
    editor.customConfig.menus = [
        'foreColor',
        'italic'
    ]
    editor.create()
    var content = editor.$textContainerElem[0];
    content.style = "border: 1px solid rgb(204, 204, 204);min-width:400px;max-width:800px;z-index: 10000;"
    var inner = content.getElementsByTagName("div")[0]
    inner.className = "input-group-text w-e-text"
    inner.style = "overflow:hidden;width:100%; height:100%;font-size:32px"
 
    editor.txt.html('')
    var toolbar = editor.$toolbarElem[0];
    toolbar.style = "";
    console.log(123)

    // 用于展示的切换
    var lsflag =false
    $("#list-button").click(function (e) { 
        if(lsflag){
            $("#lists").removeClass("list-active")
            $("#lists").addClass("list-noactive")
        }else{
            $("#lists").addClass("list-active")
            $("#lists").removeClass("list-noactive")
        }
        lsflag = !lsflag;
    })

    inner.onkeydown = banEnter;

    /**
     * 
     * @param {*} event 
     */
    function banEnter(event){
        if(event.keyCode ==13){
            event.keyCode=0;
            event.returnValue=false;
        }
    }
}

